<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Trolley</title>

    <!-- Google Font: Source Sans Pro -->
    <link rel="stylesheet"
          href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
    <!-- Font Awesome Icons -->
    <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css"
          integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
    <!-- Theme style -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/admin-lte@3.1/dist/css/adminlte.min.css">
    <link href="static/img/trolley.png" rel="icon">
    <script>
      var data = {{ data|tojson }};








    </script>
</head>

<body class="hold-transition dark-mode sidebar-mini layout-fixed layout-navbar-fixed layout-footer-fixed">
<div class="wrapper">

    <!-- Navbar -->
    <nav class="main-header navbar navbar-expand navbar-dark">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="index.html" class="nav-link">Home</a>
            </li>
            </li>
        </ul>

        <!-- Right navbar links -->
        <ul class="navbar-nav ml-auto">
            <!-- Navbar Search -->
            <li class="nav-item">
                <a class="nav-link" data-widget="navbar-search" href="#" role="button">
                    <i class="fas fa-search"></i>
                </a>
                <div class="navbar-search-block">
                    <form class="form-inline">
                        <div class="input-group input-group-sm">
                            <input class="form-control form-control-navbar" type="search"
                                   placeholder="Search for AKS Cluster"
                                   aria-label="Search">
                            <div class="input-group-append">
                                <button class="btn btn-navbar" type="submit">
                                    <i class="fas fa-search"></i>
                                </button>
                                <button class="btn btn-navbar" type="button" data-widget="navbar-search">
                                    <i class="fas fa-times"></i>
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </li>
        </ul>
    </nav>
    <!-- /.navbar -->

    <!-- Main Sidebar Container -->
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <!-- Brand Logo -->
        <a href="#" class="brand-link">
            <img src="static/img/trolley.png" alt="Trolley Logo" class="brand-image  elevation-2"
                 style="opacity: .99">
            <span class="brand-text font-weight-light">Trolley</span>
        </a>

        <!-- Sidebar -->
        <div class="sidebar">
            <!-- Sidebar user panel (optional) -->
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                <div class="image">
                    <img src="data:image/png;base64,{{image}}" class="img-circle elevation-2" alt="User Image"
                         id="profilePicURL">
                </div>
                <div class="info">
                    <a href="#" class="d-block" id="userNameLabel"></a>
                </div>
            </div>

            <!-- SidebarSearch Form -->
            <div class="form-inline">
                <div class="input-group" data-widget="sidebar-search">
                    <input class="form-control form-control-sidebar" type="search" placeholder="Search"
                           aria-label="Search">
                    <div class="input-group-append">
                        <button class="btn btn-sidebar">
                            <i class="fas fa-search fa-fw"></i>
                        </button>
                    </div>
                </div>
            </div>

            <!-- Sidebar Menu -->
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <li class="nav-item" id="build-clusters-div" style="display: none;">
                        <a href="#" class="nav-link">
                            <i class="fad fa-cubes"></i>
                            <p>
                                Build Clusters
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview" style="display: none;">
                            <li class="nav-item" id="build-aks-clusters-div">
                                <a href="build-aks-clusters" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>AKS Clusters</p>
                                </a>
                            </li>
                            <li class="nav-item" id="build-eks-clusters-div">
                                <a href="build-eks-clusters" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>EKS Clusters</p>
                                </a>
                            </li>
                            <li class="nav-item" id="build-gke-clusters-div">
                                <a href="build-gke-clusters" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>GKE Clusters</p>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item" id="manage-clusters-div">
                        <a href="#" class="nav-link">
                            <i class="fad fa-wrench"></i>
                            <p>
                                Clusters Management
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview" style="display: none;">
                            <li class="nav-item" id="manage-aks-clusters-div">
                                <a href="manage-aks-clusters" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>AKS Clusters</p>
                                </a>
                            </li>
                            <li class="nav-item" id="manage-eks-clusters-div">
                                <a href="manage-eks-clusters" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>EKS Clusters</p>
                                </a>
                            </li>
                            <li class="nav-item" id="manage-gke-clusters-div">
                                <a href="manage-gke-clusters" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>GKE Clusters</p>
                                </a>
                            </li>
                        </ul>
                    <li class="nav-item" id="manage-vms-div">
                        <a href="#" class="nav-link">
                            <i class="far fa-server"></i>
                            <p>
                                VMs Management
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview">
                            <li class="nav-item" id="manage-az-vm-instances-div">
                                <a href="manage-az-vm-instances" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>AZ VM Instances</p>
                                </a>
                            </li>
                            <li class="nav-item" id="manage-aws-ec2-instances-div">
                                <a href="manage-aws-ec2-instances" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>AWS EC2 Instances</p>
                                </a>
                            </li>
                            <li class="nav-item" id="manage-gcp-vm-instances-div">
                                <a href="manage-gcp-vm-instances" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>GCP VM Instances</p>
                                </a>
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item" id="users-div" style="display: none;">
                        <a href="#" class="nav-link">
                            <i class="fa fa-user"></i>
                            <p>
                                Users
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview" style="display: none;">
                            <li class="nav-item">
                                <a href="manage-users" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>Users Management</p>
                                </a>
                            </li>
                            <li class="nav-item">
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item" id="teams-div" style="display: none;">
                        <a href="#" class="nav-link">
                            <i class="fa fa-users"></i>
                            <p>
                                Teams
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview" style="display: none;">
                            <li class="nav-item">
                                <a href="manage-teams" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>Teams Management</p>
                                </a>
                            </li>
                            <li class="nav-item">
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item" id="clients-div" style="display: none;">
                        <a href="#" class="nav-link">
                            <i class="fa fa-building"></i>
                            <p>
                                Clients
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview" style="display: none;">
                            <li class="nav-item">
                                <a href="manage-clients" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>Clients Management</p>
                                </a>
                            </li>
                            <li class="nav-item">
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item" id="dashboards-div" style="display: none;">
                        <a href="#" class="nav-link">
                            <i class="fa fa-tachometer"></i>
                            <p>
                                Billing Dashboards
                                <i class="fas fa-angle-left right"></i>
                            </p>
                        </a>
                        <ul class="nav nav-treeview" style="display: none;">
                            <li class="nav-item" id="products-div">
                                <a href="products-dashboards" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>Products</p>
                                </a>
                            </li>
                            <li class="nav-item" id="events-div">
                                <a href="events-dashboards" class="nav-link">
                                    <i class="far fa-circle nav-icon"></i>
                                    <p>Events</p>
                                </a>
                            </li>
                            <li class="nav-item">
                            </li>
                        </ul>
                    </li>
                    <li class="nav-item" id="settings-div" style="display: none;">
                        <a href="manage-settings" class="nav-link active">
                            <i class="fa fa-cog" aria-hidden="true"></i>
                            <p>
                                Settings
                            </p>
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="logout" class="nav-link">
                            <i class="nav-icon far fa-sign-out"></i>
                            <p>
                                Log out
                            </p>
                        </a>
                    </li>
                </ul>
            </nav>
            <!-- /.sidebar-menu -->
        </div>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <div class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                    </div><!-- /.col -->
                    <div id="clusters-data">
                    </div>
                </div><!-- /.row -->
                <div class="col-md-6">
                    <div class="card card-primary">
                        <form class="row">
                            <div class="card-body" id="cloud-provider-credentials-div">
                                <div class="card-header">
                                    <h3 class="card-title">Cloud Providers Credentials</h3>
                                </div>

                                <select class="form-control form-control-border" id="cloud-providers-dropdown">
                                    <option>AWS</option>
                                    <option>Azure</option>
                                    <option>GCP</option>
                                </select>
                                <div id="aws-access-key-id-div">
                                    <label for="aws-access-key-id" class="form-label" id="aws-access-key-id-label"
                                           style="display:none">AWS Access Key</label>
                                    <input type="text" class="form-control form-control-border" id="aws-access-key-id"
                                           style="display:none"
                                           placeholder="AKIAIOSFODNN7EXAMPLE" required>
                                </div>
                                <div id="aws-secret-access-key-div">
                                    <label for="aws-secret-access-key" class="form-label"
                                           id="aws-secret-access-key-label" style="display:none">AWS Secret Access
                                        Key</label>
                                    <input type="text" class="form-control form-control-border"
                                           id="aws-secret-access-key"
                                           style="display:none"
                                           placeholder="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" required>
                                </div>


                                <div id="azure-credentials-div" style="display:none">
                                    <label for="azure-credentials" class="form-label" id="azure-credentials-label"
                                           style="display:none">Azure Credentials</label>
                                    <textarea class="form-control form-control-border" rows="3" id="azure-credentials"
                                              style="display:none"
                                              placeholder="{
    'clientId':'5bzv2cjd-ltzv-9wh0-0y71-sbgzmawk43ss',
    'clientSecret': 'rusx1slb22b951xw8cro40nf626qjagiekn7ewtw',
    'subscriptionId': '4jfdbqjx-lwjn-guar-q4fm-gnv9h72pkbov',
    'tenantId': conq8y4a-xp87-43yt-kp1v-ae7hf3fna4ym'
}"></textarea>
                                </div>

                                <div id="google-creds-json-div"><label for="google-creds-json" class="form-label"
                                                                       id="google-creds-json-label"
                                                                       style="display:none">Google Cloud
                                    Credentials</label>
                                    <textarea class="form-control form-control-border" rows="3" id="google-creds-json"
                                              style="display:none"
                                              placeholder="Add the JSON here"></textarea>
                                </div>

                            </div>

                        </form>

                    </div>
                    <div class="col-12">
                        <button type="submit" class="btn btn-info" id="update-aws-settings-button"
                                style="display:none">Edit Credentials
                        </button>
                        <p id="update-aws-settings-label" style="display:none"> Press to edit AWS Credentials </p>
                    </div>
                    <div class="col-12">
                        <button type="submit" class="btn btn-info" id="update-az-settings-button"
                                style="display:none">Edit Credentials
                        </button>
                        <p id="update-az-settings-label" style="display:none"> Press to edit Azure Credentials </p>
                    </div>

                    <div class="col-12">
                        <button type="submit" class="btn btn-info" id="update-gcp-settings-button"
                                style="display:none">Edit Credentials
                        </button>
                        <p id="update-gcp-settings-label" style="display:none"> Press to edit GCP Credentials </p>
                    </div>

                    <div class="card card-primary">
                        <form class="row">
                            <div class="card-body" id="github-provider-credentials-div">
                                <div class="card-header">
                                    <h3 class="card-title">GitHub Credentials</h3>
                                </div>
                                <div id="github-repository-div">
                                    <label for="github-repository" class="form-label" style="display:none">GitHub
                                        Repository</label>
                                    <input type="text" class="form-control form-control-border"
                                           id="github-repository"
                                           style="display:none"
                                           placeholder="Trolley-MGMT/Trolley-Management" required>
                                </div>
                                <div id="github-actions-token-div">
                                    <label for="github-actions-token" class="form-label" style="display:none">GitHub
                                        Token</label>
                                    <input type="text" class="form-control form-control-border"
                                           id="github-actions-token"
                                           style="display:none"
                                           placeholder="ghp_4kkxRsaRJtfYmlvEl5PeFyuplNQorNxBfmnx" required>
                                </div>
                            </div>
                            <div class="col-12">

                            </div>
                        </form>
                    </div>
                    <button type="submit" class="btn btn-info" id="update-github-settings-button"
                            style="display:none">Edit Credentials
                    </button>
                    <p id="update-github-settings-label" style="display:none"> Press to edit GitHub Credentials </p>


                    <div class="card card-primary">
                        <form class="row">
                            <div class="card-body" id="infracost-provider-credentials-div">
                                <div class="card-header">
                                    <h3 class="card-title">Infracost Token</h3>
                                </div>
                                <div id="infracost-token-div">
                                    <label for="infracost-token" class="form-label" style="display:none">Infracost
                                        Token</label>
                                    <input type="text" class="form-control form-control-border"
                                           id="infracost-token"
                                           style="display:none"
                                           placeholder="ico-l4kosWUVieF5TKFHWjMNVLppIkxPo4oe" required>
                                </div>
                            </div>
                            <div class="col-12">
                            </div>
                        </form>
                    </div>

                    <div class="col-4">
                        <button type="submit" class="btn btn-info" id="update-infracost-token-button"
                                style="display:none">Edit Infracost Token
                        </button>
                        <p id="update-infracost-token-label" style="display:none"> Press to edit Infracost
                            Token </p>
                    </div>

                    <div class="row">
                        <div class="col-12">
                            <button type="submit" class="btn btn-info" id="sync-provider-data-button"
                                    style="display:none">Sync Provider Data
                            </button>
                            <p id="sync-provider-data-label" style="display:none"> Press to Sync Provider
                                Data </p>
                        </div>
                        <div class="col-12">
                            <button type="submit" class="btn btn-info" id="save-settings-button">Save
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <!--                    -->
        </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->
</div>
<aside class="control-sidebar control-sidebar-dark">
    <!-- Control sidebar content goes here -->
</aside>
<!-- /.control-sidebar -->

<!-- Main Footer -->
<footer class="main-footer">
    <strong>Copyright &copy; 2022-2023 <a href="https://trolley.io">Trolley</a></strong>
    All rights reserved.
    <div class="float-right d-none d-sm-inline-block">
        <b>Version</b> {{ data.version }}
    </div>
</footer>
</div>
<!-- ./wrapper -->

<!-- REQUIRED SCRIPTS -->
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="{{url_for('static', filename='script.js')}}"></script>
<!-- Bootstrap 4 -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js"
        integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx"
        crossorigin="anonymous"></script>
<!-- AdminLTE App -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.1.0/js/adminlte.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>

</body>
</html>
